home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 7: Sunsite / Linux Cubed Series 7 - Sunsite Vol 1.iso / system / network / daemons / nfs / nfs-serv.2be / nfs-serv / nfs-server-2.2beta16 / configure < prev    next >
Encoding:
Text File  |  1996-01-06  |  70.3 KB  |  2,838 lines

  1. #! /bin/sh
  2.  
  3. # Guess values for system-dependent variables and create Makefiles.
  4. # Generated automatically using autoconf version 2.3 
  5. # Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
  6. #
  7. # This configure script is free software; the Free Software Foundation
  8. # gives unlimited permission to copy, distribute and modify it.
  9.  
  10. # Defaults:
  11. ac_help=
  12. ac_default_prefix=/usr/local
  13. # Any additions from configure.in:
  14.  
  15. # Initialize some variables set by options.
  16. # The variables have the same names as the options, with
  17. # dashes changed to underlines.
  18. build=NONE
  19. cache_file=./config.cache
  20. exec_prefix=NONE
  21. host=NONE
  22. no_create=
  23. nonopt=NONE
  24. no_recursion=
  25. prefix=NONE
  26. program_prefix=NONE
  27. program_suffix=NONE
  28. program_transform_name=s,x,x,
  29. silent=
  30. site=
  31. srcdir=
  32. target=NONE
  33. verbose=
  34. x_includes=NONE
  35. x_libraries=NONE
  36.  
  37. # Initialize some other variables.
  38. subdirs=
  39.  
  40. ac_prev=
  41. for ac_option
  42. do
  43.  
  44.   # If the previous option needs an argument, assign it.
  45.   if test -n "$ac_prev"; then
  46.     eval "$ac_prev=\$ac_option"
  47.     ac_prev=
  48.     continue
  49.   fi
  50.  
  51.   case "$ac_option" in
  52.   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  53.   *) ac_optarg= ;;
  54.   esac
  55.  
  56.   # Accept the important Cygnus configure options, so we can diagnose typos.
  57.  
  58.   case "$ac_option" in
  59.  
  60.   -build | --build | --buil | --bui | --bu | --b)
  61.     ac_prev=build ;;
  62.   -build=* | --build=* | --buil=* | --bui=* | --bu=* | --b=*)
  63.     build="$ac_optarg" ;;
  64.  
  65.   -cache-file | --cache-file | --cache-fil | --cache-fi \
  66.   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
  67.     ac_prev=cache_file ;;
  68.   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
  69.   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
  70.     cache_file="$ac_optarg" ;;
  71.  
  72.   -disable-* | --disable-*)
  73.     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
  74.     # Reject names that are not valid shell variable names.
  75.     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
  76.       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  77.     fi
  78.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  79.     eval "enable_${ac_feature}=no" ;;
  80.  
  81.   -enable-* | --enable-*)
  82.     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
  83.     # Reject names that are not valid shell variable names.
  84.     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
  85.       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  86.     fi
  87.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  88.     case "$ac_option" in
  89.       *=*) ;;
  90.       *) ac_optarg=yes ;;
  91.     esac
  92.     eval "enable_${ac_feature}='$ac_optarg'" ;;
  93.  
  94.   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
  95.   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
  96.   | --exec | --exe | --ex)
  97.     ac_prev=exec_prefix ;;
  98.   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
  99.   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
  100.   | --exec=* | --exe=* | --ex=*)
  101.     exec_prefix="$ac_optarg" ;;
  102.  
  103.   -gas | --gas | --ga | --g)
  104.     # Obsolete; use --with-gas.
  105.     with_gas=yes ;;
  106.  
  107.   -help | --help | --hel | --he)
  108.     # Omit some internal or obsolete options to make the list less imposing.
  109.     # This message is too long to be a string in the A/UX 3.1 sh.
  110.     cat << EOF
  111. Usage: configure [options] [host]
  112. Options: [defaults in brackets after descriptions]
  113. Configuration:
  114.   --cache-file=FILE       cache test results in FILE
  115.   --help                  print this message
  116.   --no-create             do not create output files
  117.   --quiet, --silent       do not print \`checking...' messages
  118.   --version               print the version of autoconf that created configure
  119. Directory and file names:
  120.   --prefix=PREFIX         install architecture-independent files in PREFIX
  121.                           [$ac_default_prefix]
  122.   --exec-prefix=PREFIX    install architecture-dependent files in PREFIX
  123.                           [same as prefix]
  124.   --srcdir=DIR            find the sources in DIR [configure dir or ..]
  125.   --program-prefix=PREFIX prepend PREFIX to installed program names
  126.   --program-suffix=SUFFIX append SUFFIX to installed program names
  127.   --program-transform-name=PROGRAM run sed PROGRAM on installed program names
  128. Host type:
  129.   --build=BUILD           configure for building on BUILD [BUILD=HOST]
  130.   --host=HOST             configure for HOST [guessed]
  131.   --target=TARGET         configure for TARGET [TARGET=HOST]
  132. Features and packages:
  133.   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  134.   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  135.   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  136.   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  137.   --x-includes=DIR        X include files are in DIR
  138.   --x-libraries=DIR       X library files are in DIR
  139. --enable and --with options recognized:$ac_help
  140. EOF
  141.     exit 0 ;;
  142.  
  143.   -host | --host | --hos | --ho)
  144.     ac_prev=host ;;
  145.   -host=* | --host=* | --hos=* | --ho=*)
  146.     host="$ac_optarg" ;;
  147.  
  148.   -nfp | --nfp | --nf)
  149.     # Obsolete; use --without-fp.
  150.     with_fp=no ;;
  151.  
  152.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  153.   | --no-cr | --no-c)
  154.     no_create=yes ;;
  155.  
  156.   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  157.   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
  158.     no_recursion=yes ;;
  159.  
  160.   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  161.     ac_prev=prefix ;;
  162.   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  163.     prefix="$ac_optarg" ;;
  164.  
  165.   -program-prefix | --program-prefix | --program-prefi | --program-pref \
  166.   | --program-pre | --program-pr | --program-p)
  167.     ac_prev=program_prefix ;;
  168.   -program-prefix=* | --program-prefix=* | --program-prefi=* \
  169.   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
  170.     program_prefix="$ac_optarg" ;;
  171.  
  172.   -program-suffix | --program-suffix | --program-suffi | --program-suff \
  173.   | --program-suf | --program-su | --program-s)
  174.     ac_prev=program_suffix ;;
  175.   -program-suffix=* | --program-suffix=* | --program-suffi=* \
  176.   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
  177.     program_suffix="$ac_optarg" ;;
  178.  
  179.   -program-transform-name | --program-transform-name \
  180.   | --program-transform-nam | --program-transform-na \
  181.   | --program-transform-n | --program-transform- \
  182.   | --program-transform | --program-transfor \
  183.   | --program-transfo | --program-transf \
  184.   | --program-trans | --program-tran \
  185.   | --progr-tra | --program-tr | --program-t)
  186.     ac_prev=program_transform_name ;;
  187.   -program-transform-name=* | --program-transform-name=* \
  188.   | --program-transform-nam=* | --program-transform-na=* \
  189.   | --program-transform-n=* | --program-transform-=* \
  190.   | --program-transform=* | --program-transfor=* \
  191.   | --program-transfo=* | --program-transf=* \
  192.   | --program-trans=* | --program-tran=* \
  193.   | --progr-tra=* | --program-tr=* | --program-t=*)
  194.     program_transform_name="$ac_optarg" ;;
  195.  
  196.   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  197.   | -silent | --silent | --silen | --sile | --sil)
  198.     silent=yes ;;
  199.  
  200.   -site | --site | --sit)
  201.     ac_prev=site ;;
  202.   -site=* | --site=* | --sit=*)
  203.     site="$ac_optarg" ;;
  204.  
  205.   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
  206.     ac_prev=srcdir ;;
  207.   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
  208.     srcdir="$ac_optarg" ;;
  209.  
  210.   -target | --target | --targe | --targ | --tar | --ta | --t)
  211.     ac_prev=target ;;
  212.   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
  213.     target="$ac_optarg" ;;
  214.  
  215.   -v | -verbose | --verbose | --verbos | --verbo | --verb)
  216.     verbose=yes ;;
  217.  
  218.   -version | --version | --versio | --versi | --vers)
  219.     echo "configure generated by autoconf version 2.3"
  220.     exit 0 ;;
  221.  
  222.   -with-* | --with-*)
  223.     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
  224.     # Reject names that are not valid shell variable names.
  225.     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
  226.       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  227.     fi
  228.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  229.     case "$ac_option" in
  230.       *=*) ;;
  231.       *) ac_optarg=yes ;;
  232.     esac
  233.     eval "with_${ac_package}='$ac_optarg'" ;;
  234.  
  235.   -without-* | --without-*)
  236.     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
  237.     # Reject names that are not valid shell variable names.
  238.     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
  239.       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  240.     fi
  241.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  242.     eval "with_${ac_package}=no" ;;
  243.  
  244.   --x)
  245.     # Obsolete; use --with-x.
  246.     with_x=yes ;;
  247.  
  248.   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
  249.   | --x-incl | --x-inc | --x-in | --x-i)
  250.     ac_prev=x_includes ;;
  251.   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
  252.   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
  253.     x_includes="$ac_optarg" ;;
  254.  
  255.   -x-libraries | --x-libraries | --x-librarie | --x-librari \
  256.   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
  257.     ac_prev=x_libraries ;;
  258.   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
  259.   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
  260.     x_libraries="$ac_optarg" ;;
  261.  
  262.   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
  263.     ;;
  264.  
  265.   *) 
  266.     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
  267.       echo "configure: warning: $ac_option: invalid host type" 1>&2
  268.     fi
  269.     if test "x$nonopt" != xNONE; then
  270.       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
  271.     fi
  272.     nonopt="$ac_option"
  273.     ;;
  274.  
  275.   esac
  276. done
  277.  
  278. if test -n "$ac_prev"; then
  279.   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
  280. fi
  281.  
  282. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  283.  
  284. # File descriptor usage:
  285. # 0 standard input
  286. # 1 file creation
  287. # 2 errors and warnings
  288. # 3 some systems may open it to /dev/tty
  289. # 4 used on the Kubota Titan
  290. # 6 checking for... messages and results
  291. # 5 compiler messages saved in config.log
  292. if test "$silent" = yes; then
  293.   exec 6>/dev/null
  294. else
  295.   exec 6>&1
  296. fi
  297. exec 5>./config.log
  298.  
  299. echo "\
  300. This file contains any messages produced by compilers while
  301. running configure, to aid debugging if configure makes a mistake.
  302. " 1>&5
  303.  
  304. # Strip out --no-create and --no-recursion so they do not pile up.
  305. # Also quote any args containing shell metacharacters.
  306. ac_configure_args=
  307. for ac_arg
  308. do
  309.   case "$ac_arg" in
  310.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  311.   | --no-cr | --no-c) ;;
  312.   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  313.   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
  314.   *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
  315.   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
  316.   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
  317.   esac
  318. done
  319.  
  320. # NLS nuisances.
  321. # Only set LANG and LC_ALL to C if already set.
  322. # These must not be set unconditionally because not all systems understand
  323. # e.g. LANG=C (notably SCO).
  324. if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
  325. if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
  326.  
  327. # confdefs.h avoids OS command line length limits that DEFS can exceed.
  328. rm -rf conftest* confdefs.h
  329. # AIX cpp loses on an empty file, so make sure it contains at least a newline.
  330. echo > confdefs.h
  331.  
  332. # A filename unique to this package, relative to the directory that
  333. # configure is in, which we can look for to find out if srcdir is correct.
  334. ac_unique_file=nfsd.c
  335.  
  336. # Find the source files, if location was not specified.
  337. if test -z "$srcdir"; then
  338.   ac_srcdir_defaulted=yes
  339.   # Try the directory containing this script, then its parent.
  340.   ac_prog=$0
  341.   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
  342.   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
  343.   srcdir=$ac_confdir
  344.   if test ! -r $srcdir/$ac_unique_file; then
  345.     srcdir=..
  346.   fi
  347. else
  348.   ac_srcdir_defaulted=no
  349. fi
  350. if test ! -r $srcdir/$ac_unique_file; then
  351.   if test "$ac_srcdir_defaulted" = yes; then
  352.     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
  353.   else
  354.     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
  355.   fi
  356. fi
  357. srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
  358.  
  359. # Prefer explicitly selected file to automatically selected ones.
  360. if test -z "$CONFIG_SITE"; then
  361.   if test "x$prefix" != xNONE; then
  362.     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
  363.   else
  364.     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
  365.   fi
  366. fi
  367. for ac_site_file in $CONFIG_SITE; do
  368.   if test -r "$ac_site_file"; then
  369.     echo "loading site script $ac_site_file"
  370.     . "$ac_site_file"
  371.   fi
  372. done
  373.  
  374. if test -r "$cache_file"; then
  375.   echo "loading cache $cache_file"
  376.   . $cache_file
  377. else
  378.   echo "creating cache $cache_file"
  379.   > $cache_file
  380. fi
  381.  
  382. ac_ext=c
  383. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  384. ac_cpp='$CPP $CPPFLAGS'
  385. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5'
  386. ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5'
  387.  
  388. if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  389.   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
  390.   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
  391.     ac_n= ac_c='
  392. ' ac_t='    '
  393.   else
  394.     ac_n=-n ac_c= ac_t=
  395.   fi
  396. else
  397.   ac_n= ac_c='\c' ac_t=
  398. fi
  399.  
  400.  
  401.  
  402. # Extract the first word of "gcc", so it can be a program name with args.
  403. set dummy gcc; ac_word=$2
  404. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  405. if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  406.   echo $ac_n "(cached) $ac_c" 1>&6
  407. else
  408.   if test -n "$CC"; then
  409.   ac_cv_prog_CC="$CC" # Let the user override the test.
  410. else
  411.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  412.   for ac_dir in $PATH; do
  413.     test -z "$ac_dir" && ac_dir=.
  414.     if test -f $ac_dir/$ac_word; then
  415.       ac_cv_prog_CC="gcc"
  416.       break
  417.     fi
  418.   done
  419.   IFS="$ac_save_ifs"
  420.   test -z "$ac_cv_prog_CC" && ac_cv_prog_CC="cc"
  421. fi
  422. fi
  423. CC="$ac_cv_prog_CC"
  424. if test -n "$CC"; then
  425.   echo "$ac_t""$CC" 1>&6
  426. else
  427.   echo "$ac_t""no" 1>&6
  428. fi
  429.  
  430.  
  431. echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
  432. if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
  433.   echo $ac_n "(cached) $ac_c" 1>&6
  434. else
  435.   cat > conftest.c <<EOF
  436. #ifdef __GNUC__
  437.   yes;
  438. #endif
  439. EOF
  440. if ${CC-cc} -E conftest.c 2>&5 | egrep yes >/dev/null 2>&1; then
  441.   ac_cv_prog_gcc=yes
  442. else
  443.   ac_cv_prog_gcc=no
  444. fi
  445. fi
  446. echo "$ac_t""$ac_cv_prog_gcc" 1>&6
  447. if test $ac_cv_prog_gcc = yes; then
  448.   GCC=yes
  449.   if test "${CFLAGS+set}" != set; then
  450.     echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
  451. if eval "test \"`echo '$''{'ac_cv_prog_gcc_g'+set}'`\" = set"; then
  452.   echo $ac_n "(cached) $ac_c" 1>&6
  453. else
  454.   echo 'void f(){}' > conftest.c
  455. if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
  456.   ac_cv_prog_gcc_g=yes
  457. else
  458.   ac_cv_prog_gcc_g=no
  459. fi
  460. rm -f conftest*
  461.  
  462. fi
  463.     echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6
  464.     if test $ac_cv_prog_gcc_g = yes; then
  465.       CFLAGS="-g -O"
  466.     else
  467.       CFLAGS="-O"
  468.     fi
  469.   fi
  470. else
  471.   GCC=
  472.   test "${CFLAGS+set}" = set || CFLAGS="-g"
  473. fi
  474.  
  475. # If we're using gcc, we want warning flags
  476. test -n "$GCC" &&
  477.   WARNFLAGS=-Wall RPC_WARNFLAGS="-Wno-unused -Wno-switch -Wno-uninitialized"
  478.  
  479.  
  480. echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
  481. # On Suns, sometimes $CPP names a directory.
  482. if test -n "$CPP" && test -d "$CPP"; then
  483.   CPP=
  484. fi
  485. if test -z "$CPP"; then
  486. if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
  487.   echo $ac_n "(cached) $ac_c" 1>&6
  488. else
  489.     # This must be in double quotes, not single quotes, because CPP may get
  490.   # substituted into the Makefile and "${CC-cc}" will confuse make.
  491.   CPP="${CC-cc} -E"
  492.   # On the NeXT, cc -E runs the code through the compiler's parser,
  493.   # not just through cpp.
  494.   cat > conftest.$ac_ext <<EOF
  495. #line 496 "configure"
  496. #include "confdefs.h"
  497. #include <assert.h>
  498. Syntax Error
  499. EOF
  500. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  501. ac_err=`grep -v '^ *+' conftest.out`
  502. if test -z "$ac_err"; then
  503.   :
  504. else
  505.   echo "$ac_err" >&5
  506.   rm -rf conftest*
  507.   CPP="${CC-cc} -E -traditional-cpp"
  508.   cat > conftest.$ac_ext <<EOF
  509. #line 510 "configure"
  510. #include "confdefs.h"
  511. #include <assert.h>
  512. Syntax Error
  513. EOF
  514. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  515. ac_err=`grep -v '^ *+' conftest.out`
  516. if test -z "$ac_err"; then
  517.   :
  518. else
  519.   echo "$ac_err" >&5
  520.   rm -rf conftest*
  521.   CPP=/lib/cpp
  522. fi
  523. rm -f conftest*
  524. fi
  525. rm -f conftest*
  526.   ac_cv_prog_CPP="$CPP"
  527. fi
  528. fi
  529. CPP="$ac_cv_prog_CPP"
  530. echo "$ac_t""$CPP" 1>&6
  531.  
  532. # Extract the first word of "ranlib", so it can be a program name with args.
  533. set dummy ranlib; ac_word=$2
  534. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  535. if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
  536.   echo $ac_n "(cached) $ac_c" 1>&6
  537. else
  538.   if test -n "$RANLIB"; then
  539.   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
  540. else
  541.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  542.   for ac_dir in $PATH; do
  543.     test -z "$ac_dir" && ac_dir=.
  544.     if test -f $ac_dir/$ac_word; then
  545.       ac_cv_prog_RANLIB="ranlib"
  546.       break
  547.     fi
  548.   done
  549.   IFS="$ac_save_ifs"
  550.   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
  551. fi
  552. fi
  553. RANLIB="$ac_cv_prog_RANLIB"
  554. if test -n "$RANLIB"; then
  555.   echo "$ac_t""$RANLIB" 1>&6
  556. else
  557.   echo "$ac_t""no" 1>&6
  558. fi
  559.  
  560. for ac_prog in rpcgen.new rpcgen
  561. do
  562. # Extract the first word of "$ac_prog", so it can be a program name with args.
  563. set dummy $ac_prog; ac_word=$2
  564. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  565. if eval "test \"`echo '$''{'ac_cv_prog_RPCGEN'+set}'`\" = set"; then
  566.   echo $ac_n "(cached) $ac_c" 1>&6
  567. else
  568.   if test -n "$RPCGEN"; then
  569.   ac_cv_prog_RPCGEN="$RPCGEN" # Let the user override the test.
  570. else
  571.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  572.   for ac_dir in $PATH; do
  573.     test -z "$ac_dir" && ac_dir=.
  574.     if test -f $ac_dir/$ac_word; then
  575.       ac_cv_prog_RPCGEN="$ac_prog"
  576.       break
  577.     fi
  578.   done
  579.   IFS="$ac_save_ifs"
  580. fi
  581. fi
  582. RPCGEN="$ac_cv_prog_RPCGEN"
  583. if test -n "$RPCGEN"; then
  584.   echo "$ac_t""$RPCGEN" 1>&6
  585. else
  586.   echo "$ac_t""no" 1>&6
  587. fi
  588.  
  589. test -n "$RPCGEN" && break
  590. done
  591. test -n "$RPCGEN" || RPCGEN="rpcgen"
  592.  
  593. echo $ac_n "checking for rpcgen -C""... $ac_c" 1>&6
  594.   if eval "test \"`echo '$''{'nfsd_cv_prog_RPCGEN_C'+set}'`\" = set"; then
  595.   echo $ac_n "(cached) $ac_c" 1>&6
  596. else
  597.   if $RPCGEN -C -c </dev/null >/dev/null 2>/dev/null
  598.   then
  599.     nfsd_cv_prog_RPCGEN_C=yes
  600.   else
  601.     nfsd_cv_prog_RPCGEN_C=no
  602.   fi
  603. fi
  604.   echo "$ac_t""$nfsd_cv_prog_RPCGEN_C" 1>&6
  605.   if test $nfsd_cv_prog_RPCGEN_C = yes; then
  606.     RPCGEN_C=-C
  607.   fi
  608.   
  609.   test -n "$RPCGEN_C" && cat >> confdefs.h <<\EOF
  610. #define HAVE_RPCGEN_C 1
  611. EOF
  612.  
  613.  
  614. echo $ac_n "checking for rpcgen -I""... $ac_c" 1>&6
  615.   if eval "test \"`echo '$''{'nfsd_cv_prog_RPCGEN_I'+set}'`\" = set"; then
  616.   echo $ac_n "(cached) $ac_c" 1>&6
  617. else
  618.   if $RPCGEN -I -c </dev/null >/dev/null 2>/dev/null
  619.   then
  620.     nfsd_cv_prog_RPCGEN_I=yes
  621.   else
  622.     nfsd_cv_prog_RPCGEN_I=no
  623.   fi
  624.   
  625. fi
  626.    echo "$ac_t""$nfsd_cv_prog_RPCGEN_I" 1>&6
  627.   if test $nfsd_cv_prog_RPCGEN_I = yes; then
  628.     RPCGEN_I=-I
  629.   fi
  630.   
  631.   test -n "$RPCGEN_I" && cat >> confdefs.h <<\EOF
  632. #define HAVE_RPCGEN_I 1
  633. EOF
  634.  
  635.  
  636. if test $ac_cv_prog_gcc = yes; then
  637.   echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
  638. if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
  639.   echo $ac_n "(cached) $ac_c" 1>&6
  640. else
  641.     ac_pattern="Autoconf.*'x'"
  642.   cat > conftest.$ac_ext <<EOF
  643. #line 644 "configure"
  644. #include "confdefs.h"
  645. #include <sgtty.h>
  646. Autoconf TIOCGETP
  647. EOF
  648. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  649.   egrep "$ac_pattern" >/dev/null 2>&1; then
  650.   rm -rf conftest*
  651.   ac_cv_prog_gcc_traditional=yes
  652. else
  653.   rm -rf conftest*
  654.   ac_cv_prog_gcc_traditional=no
  655. fi
  656. rm -f conftest*
  657.  
  658.  
  659.   if test $ac_cv_prog_gcc_traditional = no; then
  660.     cat > conftest.$ac_ext <<EOF
  661. #line 662 "configure"
  662. #include "confdefs.h"
  663. #include <termio.h>
  664. Autoconf TCGETA
  665. EOF
  666. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  667.   egrep "$ac_pattern" >/dev/null 2>&1; then
  668.   rm -rf conftest*
  669.   ac_cv_prog_gcc_traditional=yes
  670. fi
  671. rm -f conftest*
  672.  
  673.   fi
  674. fi
  675.   echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
  676.   if test $ac_cv_prog_gcc_traditional = yes; then
  677.     CC="$CC -traditional"
  678.   fi
  679. fi
  680.  
  681. echo $ac_n "checking for AIX""... $ac_c" 1>&6
  682. cat > conftest.$ac_ext <<EOF
  683. #line 684 "configure"
  684. #include "confdefs.h"
  685. #ifdef _AIX
  686.   yes
  687. #endif
  688.  
  689. EOF
  690. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  691.   egrep "yes" >/dev/null 2>&1; then
  692.   rm -rf conftest*
  693.   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
  694. #define _ALL_SOURCE 1
  695. EOF
  696.  
  697. else
  698.   rm -rf conftest*
  699.   echo "$ac_t""no" 1>&6
  700. fi
  701. rm -f conftest*
  702.  
  703.  
  704. ac_safe=`echo "minix/config.h" | tr './\055' '___'`
  705. echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
  706. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  707.   echo $ac_n "(cached) $ac_c" 1>&6
  708. else
  709.   cat > conftest.$ac_ext <<EOF
  710. #line 711 "configure"
  711. #include "confdefs.h"
  712. #include <minix/config.h>
  713. EOF
  714. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  715. ac_err=`grep -v '^ *+' conftest.out`
  716. if test -z "$ac_err"; then
  717.   rm -rf conftest*
  718.   eval "ac_cv_header_$ac_safe=yes"
  719. else
  720.   echo "$ac_err" >&5
  721.   rm -rf conftest*
  722.   eval "ac_cv_header_$ac_safe=no"
  723. fi
  724. rm -f conftest*
  725. fi
  726. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  727.   echo "$ac_t""yes" 1>&6
  728.   MINIX=yes
  729. else
  730.   echo "$ac_t""no" 1>&6
  731. MINIX=
  732. fi
  733.  
  734. if test "$MINIX" = yes; then
  735.   cat >> confdefs.h <<\EOF
  736. #define _POSIX_SOURCE 1
  737. EOF
  738.  
  739.   cat >> confdefs.h <<\EOF
  740. #define _POSIX_1_SOURCE 2
  741. EOF
  742.  
  743.   cat >> confdefs.h <<\EOF
  744. #define _MINIX 1
  745. EOF
  746.  
  747. fi
  748.  
  749. echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
  750. if test -d /etc/conf/kconfig.d &&
  751.   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
  752. then
  753.   echo "$ac_t""yes" 1>&6
  754.   ISC=yes # If later tests want to check for ISC.
  755.   cat >> confdefs.h <<\EOF
  756. #define _POSIX_SOURCE 1
  757. EOF
  758.  
  759.   if test "$GCC" = yes; then
  760.     CC="$CC -posix"
  761.   else
  762.     CC="$CC -Xp"
  763.   fi
  764. else
  765.   echo "$ac_t""no" 1>&6
  766.   ISC=
  767. fi
  768.  
  769. ac_aux_dir=
  770. for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
  771.   if test -f $ac_dir/install-sh; then
  772.     ac_aux_dir=$ac_dir
  773.     ac_install_sh="$ac_aux_dir/install-sh -c"
  774.     break
  775.   elif test -f $ac_dir/install.sh; then
  776.     ac_aux_dir=$ac_dir
  777.     ac_install_sh="$ac_aux_dir/install.sh -c"
  778.     break
  779.   fi
  780. done
  781. if test -z "$ac_aux_dir"; then
  782.   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
  783. fi
  784. ac_config_guess=$ac_aux_dir/config.guess
  785. ac_config_sub=$ac_aux_dir/config.sub
  786. ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
  787.  
  788. # Find a good install program.  We prefer a C program (faster),
  789. # so one script is as good as another.  But avoid the broken or
  790. # incompatible versions:
  791. # SysV /etc/install, /usr/sbin/install
  792. # SunOS /usr/etc/install
  793. # IRIX /sbin/install
  794. # AIX /bin/install
  795. # AFS /usr/afsws/bin/install, which mishandles nonexistent args
  796. # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
  797. # ./install, which can be erroneously created by make from ./install.sh.
  798. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
  799. if test -z "$INSTALL"; then
  800. if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
  801.   echo $ac_n "(cached) $ac_c" 1>&6
  802. else
  803.     IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  804.   for ac_dir in $PATH; do
  805.     # Account for people who put trailing slashes in PATH elements.
  806.     case "$ac_dir/" in
  807.     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
  808.     *)
  809.       # OSF1 and SCO ODT 3.0 have their own names for install.
  810.       for ac_prog in ginstall installbsd scoinst install; do
  811.         if test -f $ac_dir/$ac_prog; then
  812.       if test $ac_prog = install &&
  813.             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
  814.         # AIX install.  It has an incompatible calling convention.
  815.         # OSF/1 installbsd also uses dspmsg, but is usable.
  816.         :
  817.       else
  818.         ac_cv_path_install="$ac_dir/$ac_prog -c"
  819.         break 2
  820.       fi
  821.     fi
  822.       done
  823.       ;;
  824.     esac
  825.   done
  826.   IFS="$ac_save_ifs"
  827.   # As a last resort, use the slow shell script.
  828.   test -z "$ac_cv_path_install" && ac_cv_path_install="$ac_install_sh"
  829. fi
  830.   INSTALL="$ac_cv_path_install"
  831. fi
  832. echo "$ac_t""$INSTALL" 1>&6
  833.  
  834. # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
  835. # It thinks the first close brace ends the variable substitution.
  836. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
  837.  
  838. test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
  839.  
  840. echo $ac_n "checking for working const""... $ac_c" 1>&6
  841. if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
  842.   echo $ac_n "(cached) $ac_c" 1>&6
  843. else
  844.   cat > conftest.$ac_ext <<EOF
  845. #line 846 "configure"
  846. #include "confdefs.h"
  847.  
  848. int main() { return 0; }
  849. int t() {
  850.  
  851. /* Ultrix mips cc rejects this.  */
  852. typedef int charset[2]; const charset x;
  853. /* SunOS 4.1.1 cc rejects this.  */
  854. char const *const *ccp;
  855. char **p;
  856. /* NEC SVR4.0.2 mips cc rejects this.  */
  857. struct point {int x, y;};
  858. static struct point const zero;
  859. /* AIX XL C 1.02.0.0 rejects this.
  860.    It does not let you subtract one const X* pointer from another in an arm
  861.    of an if-expression whose if-part is not a constant expression */
  862. const char *g = "string";
  863. ccp = &g + (g ? g-g : 0);
  864. /* HPUX 7.0 cc rejects these. */
  865. ++ccp;
  866. p = (char**) ccp;
  867. ccp = (char const *const *) p;
  868. { /* SCO 3.2v4 cc rejects this.  */
  869.   char *t;
  870.   char const *s = 0 ? (char *) 0 : (char const *) 0;
  871.  
  872.   *t++ = 0;
  873. }
  874. { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
  875.   int x[] = {25, 17};
  876.   const int *foo = &x[0];
  877.   ++foo;
  878. }
  879. { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
  880.   typedef const int *iptr;
  881.   iptr p = 0;
  882.   ++p;
  883. }
  884. { /* AIX XL C 1.02.0.0 rejects this saying
  885.      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
  886.   struct s { int j; const int *ap[3]; };
  887.   struct s *b; b->j = 5;
  888. }
  889. { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
  890.   const int foo = 10;
  891. }
  892.  
  893. ; return 0; }
  894. EOF
  895. if eval $ac_compile; then
  896.   rm -rf conftest*
  897.   ac_cv_c_const=yes
  898. else
  899.   rm -rf conftest*
  900.   ac_cv_c_const=no
  901. fi
  902. rm -f conftest*
  903.  
  904. fi
  905. echo "$ac_t""$ac_cv_c_const" 1>&6
  906. if test $ac_cv_c_const = no; then
  907.   cat >> confdefs.h <<\EOF
  908. #define const 
  909. EOF
  910.  
  911. fi
  912.  
  913. echo $ac_n "checking for vprintf""... $ac_c" 1>&6
  914. if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
  915.   echo $ac_n "(cached) $ac_c" 1>&6
  916. else
  917.   cat > conftest.$ac_ext <<EOF
  918. #line 919 "configure"
  919. #include "confdefs.h"
  920. /* System header to define __stub macros and hopefully few prototypes,
  921.     which can conflict with char vprintf(); below.  */
  922. #include <assert.h>
  923. /* Override any gcc2 internal prototype to avoid an error.  */
  924. char vprintf(); 
  925.  
  926. int main() { return 0; }
  927. int t() {
  928.  
  929. /* The GNU C library defines this for functions which it implements
  930.     to always fail with ENOSYS.  Some functions are actually named
  931.     something starting with __ and the normal name is an alias.  */
  932. #if defined (__stub_vprintf) || defined (__stub___vprintf)
  933. choke me
  934. #else
  935. vprintf();
  936. #endif
  937.  
  938. ; return 0; }
  939. EOF
  940. if eval $ac_link; then
  941.   rm -rf conftest*
  942.   eval "ac_cv_func_vprintf=yes"
  943. else
  944.   rm -rf conftest*
  945.   eval "ac_cv_func_vprintf=no"
  946. fi
  947. rm -f conftest*
  948.  
  949. fi
  950. if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
  951.   echo "$ac_t""yes" 1>&6
  952.   cat >> confdefs.h <<\EOF
  953. #define HAVE_VPRINTF 1
  954. EOF
  955.  
  956. else
  957.   echo "$ac_t""no" 1>&6
  958. fi
  959.  
  960. if test "$ac_cv_func_vprintf" != yes; then
  961. echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
  962. if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
  963.   echo $ac_n "(cached) $ac_c" 1>&6
  964. else
  965.   cat > conftest.$ac_ext <<EOF
  966. #line 967 "configure"
  967. #include "confdefs.h"
  968. /* System header to define __stub macros and hopefully few prototypes,
  969.     which can conflict with char _doprnt(); below.  */
  970. #include <assert.h>
  971. /* Override any gcc2 internal prototype to avoid an error.  */
  972. char _doprnt(); 
  973.  
  974. int main() { return 0; }
  975. int t() {
  976.  
  977. /* The GNU C library defines this for functions which it implements
  978.     to always fail with ENOSYS.  Some functions are actually named
  979.     something starting with __ and the normal name is an alias.  */
  980. #if defined (__stub__doprnt) || defined (__stub____doprnt)
  981. choke me
  982. #else
  983. _doprnt();
  984. #endif
  985.  
  986. ; return 0; }
  987. EOF
  988. if eval $ac_link; then
  989.   rm -rf conftest*
  990.   eval "ac_cv_func__doprnt=yes"
  991. else
  992.   rm -rf conftest*
  993.   eval "ac_cv_func__doprnt=no"
  994. fi
  995. rm -f conftest*
  996.  
  997. fi
  998. if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
  999.   echo "$ac_t""yes" 1>&6
  1000.   cat >> confdefs.h <<\EOF
  1001. #define HAVE_DOPRNT 1
  1002. EOF
  1003.  
  1004. else
  1005.   echo "$ac_t""no" 1>&6
  1006. fi
  1007.  
  1008. fi
  1009.  
  1010. # If we cannot run a trivial program, we must be cross compiling.
  1011. echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6
  1012. if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then
  1013.   echo $ac_n "(cached) $ac_c" 1>&6
  1014. else
  1015.   if test "$cross_compiling" = yes; then
  1016.   ac_cv_c_cross=yes
  1017. else
  1018. cat > conftest.$ac_ext <<EOF
  1019. #line 1020 "configure"
  1020. #include "confdefs.h"
  1021. main(){return(0);}
  1022. EOF
  1023. eval $ac_link
  1024. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  1025.   ac_cv_c_cross=no
  1026. else
  1027.   ac_cv_c_cross=yes
  1028. fi
  1029. fi
  1030. rm -fr conftest*
  1031. fi
  1032. cross_compiling=$ac_cv_c_cross
  1033. echo "$ac_t""$ac_cv_c_cross" 1>&6
  1034.  
  1035. echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
  1036. if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
  1037.   echo $ac_n "(cached) $ac_c" 1>&6
  1038. else
  1039.   cat > conftest.$ac_ext <<EOF
  1040. #line 1041 "configure"
  1041. #include "confdefs.h"
  1042. #include <stdlib.h>
  1043. #include <stdarg.h>
  1044. #include <string.h>
  1045. #include <float.h>
  1046. EOF
  1047. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1048. ac_err=`grep -v '^ *+' conftest.out`
  1049. if test -z "$ac_err"; then
  1050.   rm -rf conftest*
  1051.   ac_cv_header_stdc=yes
  1052. else
  1053.   echo "$ac_err" >&5
  1054.   rm -rf conftest*
  1055.   ac_cv_header_stdc=no
  1056. fi
  1057. rm -f conftest*
  1058.  
  1059. if test $ac_cv_header_stdc = yes; then
  1060.   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
  1061. cat > conftest.$ac_ext <<EOF
  1062. #line 1063 "configure"
  1063. #include "confdefs.h"
  1064. #include <string.h>
  1065. EOF
  1066. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1067.   egrep "memchr" >/dev/null 2>&1; then
  1068.   :
  1069. else
  1070.   rm -rf conftest*
  1071.   ac_cv_header_stdc=no
  1072. fi
  1073. rm -f conftest*
  1074.  
  1075. fi
  1076.  
  1077. if test $ac_cv_header_stdc = yes; then
  1078.   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
  1079. cat > conftest.$ac_ext <<EOF
  1080. #line 1081 "configure"
  1081. #include "confdefs.h"
  1082. #include <stdlib.h>
  1083. EOF
  1084. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1085.   egrep "free" >/dev/null 2>&1; then
  1086.   :
  1087. else
  1088.   rm -rf conftest*
  1089.   ac_cv_header_stdc=no
  1090. fi
  1091. rm -f conftest*
  1092.  
  1093. fi
  1094.  
  1095. if test $ac_cv_header_stdc = yes; then
  1096.   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
  1097. if test "$cross_compiling" = yes; then
  1098.   ac_cv_header_stdc=no
  1099. else
  1100. cat > conftest.$ac_ext <<EOF
  1101. #line 1102 "configure"
  1102. #include "confdefs.h"
  1103. #include <ctype.h>
  1104. #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
  1105. #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
  1106. #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
  1107. int main () { int i; for (i = 0; i < 256; i++)
  1108. if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
  1109. exit (0); }
  1110.  
  1111. EOF
  1112. eval $ac_link
  1113. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  1114.   :
  1115. else
  1116.   ac_cv_header_stdc=no
  1117. fi
  1118. fi
  1119. rm -fr conftest*
  1120. fi
  1121. fi
  1122. echo "$ac_t""$ac_cv_header_stdc" 1>&6
  1123. if test $ac_cv_header_stdc = yes; then
  1124.   cat >> confdefs.h <<\EOF
  1125. #define STDC_HEADERS 1
  1126. EOF
  1127.  
  1128. fi
  1129.  
  1130. ac_header_dirent=no
  1131. for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
  1132. do
  1133. ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
  1134. echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
  1135. if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
  1136.   echo $ac_n "(cached) $ac_c" 1>&6
  1137. else
  1138.   cat > conftest.$ac_ext <<EOF
  1139. #line 1140 "configure"
  1140. #include "confdefs.h"
  1141. #include <sys/types.h>
  1142. #include <$ac_hdr>
  1143. int main() { return 0; }
  1144. int t() {
  1145. DIR *dirp = 0;
  1146. ; return 0; }
  1147. EOF
  1148. if eval $ac_compile; then
  1149.   rm -rf conftest*
  1150.   eval "ac_cv_header_dirent_$ac_safe=yes"
  1151. else
  1152.   rm -rf conftest*
  1153.   eval "ac_cv_header_dirent_$ac_safe=no"
  1154. fi
  1155. rm -f conftest*
  1156.  
  1157. fi
  1158. if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
  1159.   echo "$ac_t""yes" 1>&6
  1160.     ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./\055' '[A-Z]___'`
  1161.   cat >> confdefs.h <<EOF
  1162. #define $ac_tr_hdr 1
  1163. EOF
  1164.  ac_header_dirent=$ac_hdr; break
  1165. else
  1166.   echo "$ac_t""no" 1>&6
  1167. fi
  1168. done
  1169. # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
  1170. if test $ac_header_dirent = dirent.h; then
  1171. echo $ac_n "checking for -ldir""... $ac_c" 1>&6
  1172. if eval "test \"`echo '$''{'ac_cv_lib_dir'+set}'`\" = set"; then
  1173.   echo $ac_n "(cached) $ac_c" 1>&6
  1174. else
  1175.   ac_save_LIBS="$LIBS"
  1176. LIBS="-ldir  $LIBS"
  1177. cat > conftest.$ac_ext <<EOF
  1178. #line 1179 "configure"
  1179. #include "confdefs.h"
  1180.  
  1181. int main() { return 0; }
  1182. int t() {
  1183. opendir()
  1184. ; return 0; }
  1185. EOF
  1186. if eval $ac_link; then
  1187.   rm -rf conftest*
  1188.   eval "ac_cv_lib_dir=yes"
  1189. else
  1190.   rm -rf conftest*
  1191.   eval "ac_cv_lib_dir=no"
  1192. fi
  1193. rm -f conftest*
  1194. LIBS="$ac_save_LIBS"
  1195.  
  1196. fi
  1197. if eval "test \"`echo '$ac_cv_lib_'dir`\" = yes"; then
  1198.   echo "$ac_t""yes" 1>&6
  1199.   LIBS="$LIBS -ldir"
  1200. else
  1201.   echo "$ac_t""no" 1>&6
  1202. fi
  1203.  
  1204. else
  1205. echo $ac_n "checking for -lx""... $ac_c" 1>&6
  1206. if eval "test \"`echo '$''{'ac_cv_lib_x'+set}'`\" = set"; then
  1207.   echo $ac_n "(cached) $ac_c" 1>&6
  1208. else
  1209.   ac_save_LIBS="$LIBS"
  1210. LIBS="-lx  $LIBS"
  1211. cat > conftest.$ac_ext <<EOF
  1212. #line 1213 "configure"
  1213. #include "confdefs.h"
  1214.  
  1215. int main() { return 0; }
  1216. int t() {
  1217. opendir()
  1218. ; return 0; }
  1219. EOF
  1220. if eval $ac_link; then
  1221.   rm -rf conftest*
  1222.   eval "ac_cv_lib_x=yes"
  1223. else
  1224.   rm -rf conftest*
  1225.   eval "ac_cv_lib_x=no"
  1226. fi
  1227. rm -f conftest*
  1228. LIBS="$ac_save_LIBS"
  1229.  
  1230. fi
  1231. if eval "test \"`echo '$ac_cv_lib_'x`\" = yes"; then
  1232.   echo "$ac_t""yes" 1>&6
  1233.   LIBS="$LIBS -lx"
  1234. else
  1235.   echo "$ac_t""no" 1>&6
  1236. fi
  1237.  
  1238. fi
  1239.  
  1240. echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
  1241. if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
  1242.   echo $ac_n "(cached) $ac_c" 1>&6
  1243. else
  1244.   cat > conftest.$ac_ext <<EOF
  1245. #line 1246 "configure"
  1246. #include "confdefs.h"
  1247. #include <sys/types.h>
  1248. #include <signal.h>
  1249. #ifdef signal
  1250. #undef signal
  1251. #endif
  1252. #ifdef __cplusplus
  1253. extern "C"
  1254. #endif
  1255. void (*signal ()) ();
  1256. int main() { return 0; }
  1257. int t() {
  1258. int i;
  1259. ; return 0; }
  1260. EOF
  1261. if eval $ac_compile; then
  1262.   rm -rf conftest*
  1263.   ac_cv_type_signal=void
  1264. else
  1265.   rm -rf conftest*
  1266.   ac_cv_type_signal=int
  1267. fi
  1268. rm -f conftest*
  1269.  
  1270. fi
  1271. echo "$ac_t""$ac_cv_type_signal" 1>&6
  1272. cat >> confdefs.h <<EOF
  1273. #define RETSIGTYPE $ac_cv_type_signal
  1274. EOF
  1275.  
  1276.  
  1277. echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
  1278. if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
  1279.   echo $ac_n "(cached) $ac_c" 1>&6
  1280. else
  1281.   cat > conftest.$ac_ext <<EOF
  1282. #line 1283 "configure"
  1283. #include "confdefs.h"
  1284. #include <sys/types.h>
  1285. #include <sys/stat.h>
  1286. int main() { return 0; }
  1287. int t() {
  1288. struct stat s; s.st_blksize;
  1289. ; return 0; }
  1290. EOF
  1291. if eval $ac_compile; then
  1292.   rm -rf conftest*
  1293.   ac_cv_struct_st_blksize=yes
  1294. else
  1295.   rm -rf conftest*
  1296.   ac_cv_struct_st_blksize=no
  1297. fi
  1298. rm -f conftest*
  1299.  
  1300. fi
  1301. echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6
  1302. if test $ac_cv_struct_st_blksize = yes; then
  1303.   cat >> confdefs.h <<\EOF
  1304. #define HAVE_ST_BLKSIZE 1
  1305. EOF
  1306.  
  1307. fi
  1308.  
  1309. echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6
  1310. if eval "test \"`echo '$''{'ac_cv_struct_st_blocks'+set}'`\" = set"; then
  1311.   echo $ac_n "(cached) $ac_c" 1>&6
  1312. else
  1313.   cat > conftest.$ac_ext <<EOF
  1314. #line 1315 "configure"
  1315. #include "confdefs.h"
  1316. #include <sys/types.h>
  1317. #include <sys/stat.h>
  1318. int main() { return 0; }
  1319. int t() {
  1320. struct stat s; s.st_blocks;
  1321. ; return 0; }
  1322. EOF
  1323. if eval $ac_compile; then
  1324.   rm -rf conftest*
  1325.   ac_cv_struct_st_blocks=yes
  1326. else
  1327.   rm -rf conftest*
  1328.   ac_cv_struct_st_blocks=no
  1329. fi
  1330. rm -f conftest*
  1331.  
  1332. fi
  1333. echo "$ac_t""$ac_cv_struct_st_blocks" 1>&6
  1334. if test $ac_cv_struct_st_blocks = yes; then
  1335.   cat >> confdefs.h <<\EOF
  1336. #define HAVE_ST_BLOCKS 1
  1337. EOF
  1338.  
  1339. else
  1340.   LIBOBJS="$LIBOBJS fileblocks.o"
  1341. fi
  1342.  
  1343. echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
  1344. if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
  1345.   echo $ac_n "(cached) $ac_c" 1>&6
  1346. else
  1347.   cat > conftest.$ac_ext <<EOF
  1348. #line 1349 "configure"
  1349. #include "confdefs.h"
  1350. #include <sys/types.h>
  1351. #include <sys/stat.h>
  1352. int main() { return 0; }
  1353. int t() {
  1354. struct stat s; s.st_rdev;
  1355. ; return 0; }
  1356. EOF
  1357. if eval $ac_compile; then
  1358.   rm -rf conftest*
  1359.   ac_cv_struct_st_rdev=yes
  1360. else
  1361.   rm -rf conftest*
  1362.   ac_cv_struct_st_rdev=no
  1363. fi
  1364. rm -f conftest*
  1365.  
  1366. fi
  1367. echo "$ac_t""$ac_cv_struct_st_rdev" 1>&6
  1368. if test $ac_cv_struct_st_rdev = yes; then
  1369.   cat >> confdefs.h <<\EOF
  1370. #define HAVE_ST_RDEV 1
  1371. EOF
  1372.  
  1373. fi
  1374.  
  1375. echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
  1376. if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
  1377.   echo $ac_n "(cached) $ac_c" 1>&6
  1378. else
  1379.   cat > conftest.$ac_ext <<EOF
  1380. #line 1381 "configure"
  1381. #include "confdefs.h"
  1382. #include <sys/types.h>
  1383. #include <sys/stat.h>
  1384.  
  1385. #if defined(S_ISBLK) && defined(S_IFDIR)
  1386. # if S_ISBLK (S_IFDIR)
  1387. You lose.
  1388. # endif
  1389. #endif
  1390.  
  1391. #if defined(S_ISBLK) && defined(S_IFCHR)
  1392. # if S_ISBLK (S_IFCHR)
  1393. You lose.
  1394. # endif
  1395. #endif
  1396.  
  1397. #if defined(S_ISLNK) && defined(S_IFREG)
  1398. # if S_ISLNK (S_IFREG)
  1399. You lose.
  1400. # endif
  1401. #endif
  1402.  
  1403. #if defined(S_ISSOCK) && defined(S_IFREG)
  1404. # if S_ISSOCK (S_IFREG)
  1405. You lose.
  1406. # endif
  1407. #endif
  1408.  
  1409. EOF
  1410. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1411.   egrep "You lose" >/dev/null 2>&1; then
  1412.   rm -rf conftest*
  1413.   ac_cv_header_stat_broken=yes
  1414. else
  1415.   rm -rf conftest*
  1416.   ac_cv_header_stat_broken=no
  1417. fi
  1418. rm -f conftest*
  1419.  
  1420. fi
  1421. echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
  1422. if test $ac_cv_header_stat_broken = yes; then
  1423.   cat >> confdefs.h <<\EOF
  1424. #define STAT_MACROS_BROKEN 1
  1425. EOF
  1426.  
  1427. fi
  1428.  
  1429. echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
  1430. if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
  1431.   echo $ac_n "(cached) $ac_c" 1>&6
  1432. else
  1433.   cat > conftest.$ac_ext <<EOF
  1434. #line 1435 "configure"
  1435. #include "confdefs.h"
  1436. #include <sys/types.h>
  1437. EOF
  1438. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1439.   egrep "uid_t" >/dev/null 2>&1; then
  1440.   rm -rf conftest*
  1441.   ac_cv_type_uid_t=yes
  1442. else
  1443.   rm -rf conftest*
  1444.   ac_cv_type_uid_t=no
  1445. fi
  1446. rm -f conftest*
  1447.  
  1448. fi
  1449. echo "$ac_t""$ac_cv_type_uid_t" 1>&6
  1450. if test $ac_cv_type_uid_t = no; then
  1451.   cat >> confdefs.h <<\EOF
  1452. #define uid_t int
  1453. EOF
  1454.  
  1455.   cat >> confdefs.h <<\EOF
  1456. #define gid_t int
  1457. EOF
  1458.  
  1459. fi
  1460.  
  1461. echo $ac_n "checking for mode_t""... $ac_c" 1>&6
  1462. if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
  1463.   echo $ac_n "(cached) $ac_c" 1>&6
  1464. else
  1465.   cat > conftest.$ac_ext <<EOF
  1466. #line 1467 "configure"
  1467. #include "confdefs.h"
  1468. #include <sys/types.h>
  1469. #if STDC_HEADERS
  1470. #include <stdlib.h>
  1471. #endif
  1472. EOF
  1473. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1474.   egrep "mode_t" >/dev/null 2>&1; then
  1475.   rm -rf conftest*
  1476.   ac_cv_type_mode_t=yes
  1477. else
  1478.   rm -rf conftest*
  1479.   ac_cv_type_mode_t=no
  1480. fi
  1481. rm -f conftest*
  1482.  
  1483. fi
  1484. echo "$ac_t""$ac_cv_type_mode_t" 1>&6
  1485. if test $ac_cv_type_mode_t = no; then
  1486.   cat >> confdefs.h <<\EOF
  1487. #define mode_t int
  1488. EOF
  1489.  
  1490. fi
  1491.  
  1492. echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
  1493. if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then
  1494.   echo $ac_n "(cached) $ac_c" 1>&6
  1495. else
  1496.   if test "$cross_compiling" = yes; then
  1497.   ac_cv_type_getgroups=cross
  1498. else
  1499. cat > conftest.$ac_ext <<EOF
  1500. #line 1501 "configure"
  1501. #include "confdefs.h"
  1502.  
  1503. /* Thanks to Mike Rendell for this test.  */
  1504. #include <sys/types.h>
  1505. #define NGID 256
  1506. #undef MAX
  1507. #define MAX(x, y) ((x) > (y) ? (x) : (y))
  1508. main()
  1509. {
  1510.   gid_t gidset[NGID];
  1511.   int i, n;
  1512.   union { gid_t gval; long lval; }  val;
  1513.  
  1514.   val.lval = -1;
  1515.   for (i = 0; i < NGID; i++)
  1516.     gidset[i] = val.gval;
  1517.   n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
  1518.                  gidset);
  1519.   /* Exit non-zero if getgroups seems to require an array of ints.  This
  1520.      happens when gid_t is short but getgroups modifies an array of ints.  */
  1521.   exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
  1522. }
  1523.  
  1524. EOF
  1525. eval $ac_link
  1526. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  1527.     ac_cv_type_getgroups=gid_t
  1528. else
  1529.   ac_cv_type_getgroups=int
  1530. fi
  1531. fi
  1532. rm -fr conftest*
  1533. if test $ac_cv_type_getgroups = cross; then
  1534.         cat > conftest.$ac_ext <<EOF
  1535. #line 1536 "configure"
  1536. #include "confdefs.h"
  1537. #include <unistd.h>
  1538. EOF
  1539. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1540.   egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
  1541.   rm -rf conftest*
  1542.   ac_cv_type_getgroups=gid_t
  1543. else
  1544.   rm -rf conftest*
  1545.   ac_cv_type_getgroups=int
  1546. fi
  1547. rm -f conftest*
  1548.  
  1549. fi
  1550. fi
  1551. echo "$ac_t""$ac_cv_type_getgroups" 1>&6
  1552. cat >> confdefs.h <<EOF
  1553. #define GETGROUPS_T $ac_cv_type_getgroups
  1554. EOF
  1555.  
  1556.  
  1557. echo $ac_n "checking for xdrproc_t""... $ac_c" 1>&6
  1558.   if eval "test \"`echo '$''{'nfsd_cv_type_xdrproc_t'+set}'`\" = set"; then
  1559.   echo $ac_n "(cached) $ac_c" 1>&6
  1560. else
  1561.   cat > conftest.$ac_ext <<EOF
  1562. #line 1563 "configure"
  1563. #include "confdefs.h"
  1564. #include <rpc/xdr.h>
  1565. EOF
  1566. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1567.   egrep "xdrproc_t" >/dev/null 2>&1; then
  1568.   rm -rf conftest*
  1569.   nfsd_cv_type_xdrproc_t=yes
  1570. else
  1571.   rm -rf conftest*
  1572.   nfsd_cv_type_xdrproc_t=no
  1573. fi
  1574. rm -f conftest*
  1575.  
  1576.   
  1577. fi
  1578.    echo "$ac_t""$nfsd_cv_type_xdrproc_t" 1>&6
  1579.   test $nfsd_cv_type_xdrproc_t = yes && cat >> confdefs.h <<\EOF
  1580. #define HAVE_XDRPROC_T 1
  1581. EOF
  1582.  
  1583.  
  1584. echo $ac_n "checking whether utime accepts a null argument""... $ac_c" 1>&6
  1585. if eval "test \"`echo '$''{'ac_cv_func_utime_null'+set}'`\" = set"; then
  1586.   echo $ac_n "(cached) $ac_c" 1>&6
  1587. else
  1588.   rm -f conftestdata; > conftestdata
  1589. # Sequent interprets utime(file, 0) to mean use start of epoch.  Wrong.
  1590. if test "$cross_compiling" = yes; then
  1591.   ac_cv_func_utime_null=no
  1592. else
  1593. cat > conftest.$ac_ext <<EOF
  1594. #line 1595 "configure"
  1595. #include "confdefs.h"
  1596. #include <sys/types.h>
  1597. #include <sys/stat.h>
  1598. main() {
  1599. struct stat s, t;
  1600. exit(!(stat ("conftestdata", &s) == 0 && utime("conftestdata", (long *)0) == 0
  1601. && stat("conftestdata", &t) == 0 && t.st_mtime >= s.st_mtime
  1602. && t.st_mtime - s.st_mtime < 120));
  1603. }
  1604. EOF
  1605. eval $ac_link
  1606. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  1607.   ac_cv_func_utime_null=yes
  1608. else
  1609.   ac_cv_func_utime_null=no
  1610. fi
  1611. fi
  1612. rm -fr conftest*
  1613. rm -f core core.* *.core
  1614. fi
  1615. echo "$ac_t""$ac_cv_func_utime_null" 1>&6
  1616. if test $ac_cv_func_utime_null = yes; then
  1617.   cat >> confdefs.h <<\EOF
  1618. #define HAVE_UTIME_NULL 1
  1619. EOF
  1620.  
  1621. fi
  1622.  
  1623. echo $ac_n "checking whether sys/types.h defines makedev""... $ac_c" 1>&6
  1624. if eval "test \"`echo '$''{'ac_cv_header_sys_types_h_makedev'+set}'`\" = set"; then
  1625.   echo $ac_n "(cached) $ac_c" 1>&6
  1626. else
  1627.   cat > conftest.$ac_ext <<EOF
  1628. #line 1629 "configure"
  1629. #include "confdefs.h"
  1630. #include <sys/types.h>
  1631. int main() { return 0; }
  1632. int t() {
  1633. return makedev(0, 0);
  1634. ; return 0; }
  1635. EOF
  1636. if eval $ac_link; then
  1637.   rm -rf conftest*
  1638.   ac_cv_header_sys_types_h_makedev=yes
  1639. else
  1640.   rm -rf conftest*
  1641.   ac_cv_header_sys_types_h_makedev=no
  1642. fi
  1643. rm -f conftest*
  1644.  
  1645.  
  1646. fi
  1647. echo "$ac_t""$ac_cv_header_sys_types_h_makedev" 1>&6
  1648.  
  1649. if test $ac_cv_header_sys_types_h_makedev = no; then
  1650. ac_safe=`echo "sys/mkdev.h" | tr './\055' '___'`
  1651. echo $ac_n "checking for sys/mkdev.h""... $ac_c" 1>&6
  1652. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1653.   echo $ac_n "(cached) $ac_c" 1>&6
  1654. else
  1655.   cat > conftest.$ac_ext <<EOF
  1656. #line 1657 "configure"
  1657. #include "confdefs.h"
  1658. #include <sys/mkdev.h>
  1659. EOF
  1660. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1661. ac_err=`grep -v '^ *+' conftest.out`
  1662. if test -z "$ac_err"; then
  1663.   rm -rf conftest*
  1664.   eval "ac_cv_header_$ac_safe=yes"
  1665. else
  1666.   echo "$ac_err" >&5
  1667.   rm -rf conftest*
  1668.   eval "ac_cv_header_$ac_safe=no"
  1669. fi
  1670. rm -f conftest*
  1671. fi
  1672. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1673.   echo "$ac_t""yes" 1>&6
  1674.   cat >> confdefs.h <<\EOF
  1675. #define MAJOR_IN_MKDEV 1
  1676. EOF
  1677.  
  1678. else
  1679.   echo "$ac_t""no" 1>&6
  1680. fi
  1681.  
  1682.  
  1683.   if test $ac_cv_header_sys_mkdev_h = no; then
  1684. ac_safe=`echo "sys/sysmacros.h" | tr './\055' '___'`
  1685. echo $ac_n "checking for sys/sysmacros.h""... $ac_c" 1>&6
  1686. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1687.   echo $ac_n "(cached) $ac_c" 1>&6
  1688. else
  1689.   cat > conftest.$ac_ext <<EOF
  1690. #line 1691 "configure"
  1691. #include "confdefs.h"
  1692. #include <sys/sysmacros.h>
  1693. EOF
  1694. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1695. ac_err=`grep -v '^ *+' conftest.out`
  1696. if test -z "$ac_err"; then
  1697.   rm -rf conftest*
  1698.   eval "ac_cv_header_$ac_safe=yes"
  1699. else
  1700.   echo "$ac_err" >&5
  1701.   rm -rf conftest*
  1702.   eval "ac_cv_header_$ac_safe=no"
  1703. fi
  1704. rm -f conftest*
  1705. fi
  1706. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1707.   echo "$ac_t""yes" 1>&6
  1708.   cat >> confdefs.h <<\EOF
  1709. #define MAJOR_IN_SYSMACROS 1
  1710. EOF
  1711.  
  1712. else
  1713.   echo "$ac_t""no" 1>&6
  1714. fi
  1715.  
  1716.   fi
  1717. fi
  1718.  
  1719. for ac_hdr in unistd.h string.h memory.h fcntl.h syslog.h sys/file.h sys/time.h utime.h
  1720. do
  1721. ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
  1722. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  1723. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1724.   echo $ac_n "(cached) $ac_c" 1>&6
  1725. else
  1726.   cat > conftest.$ac_ext <<EOF
  1727. #line 1728 "configure"
  1728. #include "confdefs.h"
  1729. #include <$ac_hdr>
  1730. EOF
  1731. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1732. ac_err=`grep -v '^ *+' conftest.out`
  1733. if test -z "$ac_err"; then
  1734.   rm -rf conftest*
  1735.   eval "ac_cv_header_$ac_safe=yes"
  1736. else
  1737.   echo "$ac_err" >&5
  1738.   rm -rf conftest*
  1739.   eval "ac_cv_header_$ac_safe=no"
  1740. fi
  1741. rm -f conftest*
  1742. fi
  1743. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1744.   echo "$ac_t""yes" 1>&6
  1745.     ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./\055' '[A-Z]___'`
  1746.   cat >> confdefs.h <<EOF
  1747. #define $ac_tr_hdr 1
  1748. EOF
  1749.  
  1750. else
  1751.   echo "$ac_t""no" 1>&6
  1752. fi
  1753. done
  1754.  
  1755. # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
  1756. # for constant arguments.  Useless!
  1757. echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
  1758. if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
  1759.   echo $ac_n "(cached) $ac_c" 1>&6
  1760. else
  1761.   cat > conftest.$ac_ext <<EOF
  1762. #line 1763 "configure"
  1763. #include "confdefs.h"
  1764. #include <alloca.h>
  1765. int main() { return 0; }
  1766. int t() {
  1767. char *p = alloca(2 * sizeof(int));
  1768. ; return 0; }
  1769. EOF
  1770. if eval $ac_link; then
  1771.   rm -rf conftest*
  1772.   ac_cv_header_alloca_h=yes
  1773. else
  1774.   rm -rf conftest*
  1775.   ac_cv_header_alloca_h=no
  1776. fi
  1777. rm -f conftest*
  1778.  
  1779. fi
  1780. echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
  1781. if test $ac_cv_header_alloca_h = yes; then
  1782.   cat >> confdefs.h <<\EOF
  1783. #define HAVE_ALLOCA_H 1
  1784. EOF
  1785.  
  1786. fi
  1787.  
  1788. echo $ac_n "checking for alloca""... $ac_c" 1>&6
  1789. if eval "test \"`echo '$''{'ac_cv_func_alloca'+set}'`\" = set"; then
  1790.   echo $ac_n "(cached) $ac_c" 1>&6
  1791. else
  1792.   cat > conftest.$ac_ext <<EOF
  1793. #line 1794 "configure"
  1794. #include "confdefs.h"
  1795.  
  1796. #ifdef __GNUC__
  1797. # define alloca __builtin_alloca
  1798. #else
  1799. # if HAVE_ALLOCA_H
  1800. #  include <alloca.h>
  1801. # else
  1802. #  ifdef _AIX
  1803.  #pragma alloca
  1804. #  else
  1805. #   ifndef alloca /* predefined by HP cc +Olibcalls */
  1806. char *alloca ();
  1807. #   endif
  1808. #  endif
  1809. # endif
  1810. #endif
  1811.  
  1812. int main() { return 0; }
  1813. int t() {
  1814. char *p = (char *) alloca(1);
  1815. ; return 0; }
  1816. EOF
  1817. if eval $ac_link; then
  1818.   rm -rf conftest*
  1819.   ac_cv_func_alloca=yes
  1820. else
  1821.   rm -rf conftest*
  1822.   ac_cv_func_alloca=no
  1823. fi
  1824. rm -f conftest*
  1825.  
  1826. fi
  1827. echo "$ac_t""$ac_cv_func_alloca" 1>&6
  1828. if test $ac_cv_func_alloca = yes; then
  1829.   cat >> confdefs.h <<\EOF
  1830. #define HAVE_ALLOCA 1
  1831. EOF
  1832.  
  1833. fi
  1834.  
  1835. if test $ac_cv_func_alloca = no; then
  1836.   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
  1837.   # that cause trouble.  Some versions do not even contain alloca or
  1838.   # contain a buggy version.  If you still want to use their alloca,
  1839.   # use ar to extract alloca.o from them instead of compiling alloca.c.
  1840.   ALLOCA=alloca.o
  1841.   cat >> confdefs.h <<\EOF
  1842. #define C_ALLOCA 1
  1843. EOF
  1844.  
  1845.  
  1846. echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
  1847. if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
  1848.   echo $ac_n "(cached) $ac_c" 1>&6
  1849. else
  1850.   cat > conftest.$ac_ext <<EOF
  1851. #line 1852 "configure"
  1852. #include "confdefs.h"
  1853. #if defined(CRAY) && ! defined(CRAY2)
  1854. webecray
  1855. #else
  1856. wenotbecray
  1857. #endif
  1858.  
  1859. EOF
  1860. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1861.   egrep "webecray" >/dev/null 2>&1; then
  1862.   rm -rf conftest*
  1863.   ac_cv_os_cray=yes
  1864. else
  1865.   rm -rf conftest*
  1866.   ac_cv_os_cray=no
  1867. fi
  1868. rm -f conftest*
  1869.  
  1870. fi
  1871. echo "$ac_t""$ac_cv_os_cray" 1>&6
  1872. if test $ac_cv_os_cray = yes; then
  1873. for ac_func in _getb67 GETB67 getb67; do
  1874.   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  1875. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  1876.   echo $ac_n "(cached) $ac_c" 1>&6
  1877. else
  1878.   cat > conftest.$ac_ext <<EOF
  1879. #line 1880 "configure"
  1880. #include "confdefs.h"
  1881. /* System header to define __stub macros and hopefully few prototypes,
  1882.     which can conflict with char $ac_func(); below.  */
  1883. #include <assert.h>
  1884. /* Override any gcc2 internal prototype to avoid an error.  */
  1885. char $ac_func(); 
  1886.  
  1887. int main() { return 0; }
  1888. int t() {
  1889.  
  1890. /* The GNU C library defines this for functions which it implements
  1891.     to always fail with ENOSYS.  Some functions are actually named
  1892.     something starting with __ and the normal name is an alias.  */
  1893. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  1894. choke me
  1895. #else
  1896. $ac_func();
  1897. #endif
  1898.  
  1899. ; return 0; }
  1900. EOF
  1901. if eval $ac_link; then
  1902.   rm -rf conftest*
  1903.   eval "ac_cv_func_$ac_func=yes"
  1904. else
  1905.   rm -rf conftest*
  1906.   eval "ac_cv_func_$ac_func=no"
  1907. fi
  1908. rm -f conftest*
  1909.  
  1910. fi
  1911. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  1912.   echo "$ac_t""yes" 1>&6
  1913.   cat >> confdefs.h <<EOF
  1914. #define CRAY_STACKSEG_END $ac_func
  1915. EOF
  1916.  
  1917.   break
  1918. else
  1919.   echo "$ac_t""no" 1>&6
  1920. fi
  1921.  
  1922. done
  1923. fi
  1924.  
  1925. echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
  1926. if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
  1927.   echo $ac_n "(cached) $ac_c" 1>&6
  1928. else
  1929.   if test "$cross_compiling" = yes; then
  1930.   ac_cv_c_stack_direction=0
  1931. else
  1932. cat > conftest.$ac_ext <<EOF
  1933. #line 1934 "configure"
  1934. #include "confdefs.h"
  1935. find_stack_direction ()
  1936. {
  1937.   static char *addr = 0;
  1938.   auto char dummy;
  1939.   if (addr == 0)
  1940.     {
  1941.       addr = &dummy;
  1942.       return find_stack_direction ();
  1943.     }
  1944.   else
  1945.     return (&dummy > addr) ? 1 : -1;
  1946. }
  1947. main ()
  1948. {
  1949.   exit (find_stack_direction() < 0);
  1950. }
  1951. EOF
  1952. eval $ac_link
  1953. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  1954.   ac_cv_c_stack_direction=1
  1955. else
  1956.   ac_cv_c_stack_direction=-1
  1957. fi
  1958. fi
  1959. rm -fr conftest*
  1960. fi
  1961. echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
  1962. cat >> confdefs.h <<EOF
  1963. #define STACK_DIRECTION $ac_cv_c_stack_direction
  1964. EOF
  1965.  
  1966. fi
  1967.  
  1968. echo $ac_n "checking for -lnsl""... $ac_c" 1>&6
  1969. if eval "test \"`echo '$''{'ac_cv_lib_nsl'+set}'`\" = set"; then
  1970.   echo $ac_n "(cached) $ac_c" 1>&6
  1971. else
  1972.   ac_save_LIBS="$LIBS"
  1973. LIBS="-lnsl  $LIBS"
  1974. cat > conftest.$ac_ext <<EOF
  1975. #line 1976 "configure"
  1976. #include "confdefs.h"
  1977.  
  1978. int main() { return 0; }
  1979. int t() {
  1980. main()
  1981. ; return 0; }
  1982. EOF
  1983. if eval $ac_link; then
  1984.   rm -rf conftest*
  1985.   eval "ac_cv_lib_nsl=yes"
  1986. else
  1987.   rm -rf conftest*
  1988.   eval "ac_cv_lib_nsl=no"
  1989. fi
  1990. rm -f conftest*
  1991. LIBS="$ac_save_LIBS"
  1992.  
  1993. fi
  1994. if eval "test \"`echo '$ac_cv_lib_'nsl`\" = yes"; then
  1995.   echo "$ac_t""yes" 1>&6
  1996.     ac_tr_lib=HAVE_LIB`echo nsl | tr '[a-z]' '[A-Z]'`
  1997.   cat >> confdefs.h <<EOF
  1998. #define $ac_tr_lib 1
  1999. EOF
  2000.  
  2001.   LIBS="-lnsl $LIBS"
  2002.  
  2003. else
  2004.   echo "$ac_t""no" 1>&6
  2005. fi
  2006.  
  2007. echo $ac_n "checking for -lsocket""... $ac_c" 1>&6
  2008. if eval "test \"`echo '$''{'ac_cv_lib_socket'+set}'`\" = set"; then
  2009.   echo $ac_n "(cached) $ac_c" 1>&6
  2010. else
  2011.   ac_save_LIBS="$LIBS"
  2012. LIBS="-lsocket  $LIBS"
  2013. cat > conftest.$ac_ext <<EOF
  2014. #line 2015 "configure"
  2015. #include "confdefs.h"
  2016.  
  2017. int main() { return 0; }
  2018. int t() {
  2019. main()
  2020. ; return 0; }
  2021. EOF
  2022. if eval $ac_link; then
  2023.   rm -rf conftest*
  2024.   eval "ac_cv_lib_socket=yes"
  2025. else
  2026.   rm -rf conftest*
  2027.   eval "ac_cv_lib_socket=no"
  2028. fi
  2029. rm -f conftest*
  2030. LIBS="$ac_save_LIBS"
  2031.  
  2032. fi
  2033. if eval "test \"`echo '$ac_cv_lib_'socket`\" = yes"; then
  2034.   echo "$ac_t""yes" 1>&6
  2035.     ac_tr_lib=HAVE_LIB`echo socket | tr '[a-z]' '[A-Z]'`
  2036.   cat >> confdefs.h <<EOF
  2037. #define $ac_tr_lib 1
  2038. EOF
  2039.  
  2040.   LIBS="-lsocket $LIBS"
  2041.  
  2042. else
  2043.   echo "$ac_t""no" 1>&6
  2044. fi
  2045.  
  2046. for ac_func in strerror realpath mkdir rename utimes strdup strstr
  2047. do
  2048. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2049. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  2050.   echo $ac_n "(cached) $ac_c" 1>&6
  2051. else
  2052.   cat > conftest.$ac_ext <<EOF
  2053. #line 2054 "configure"
  2054. #include "confdefs.h"
  2055. /* System header to define __stub macros and hopefully few prototypes,
  2056.     which can conflict with char $ac_func(); below.  */
  2057. #include <assert.h>
  2058. /* Override any gcc2 internal prototype to avoid an error.  */
  2059. char $ac_func(); 
  2060.  
  2061. int main() { return 0; }
  2062. int t() {
  2063.  
  2064. /* The GNU C library defines this for functions which it implements
  2065.     to always fail with ENOSYS.  Some functions are actually named
  2066.     something starting with __ and the normal name is an alias.  */
  2067. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2068. choke me
  2069. #else
  2070. $ac_func();
  2071. #endif
  2072.  
  2073. ; return 0; }
  2074. EOF
  2075. if eval $ac_link; then
  2076.   rm -rf conftest*
  2077.   eval "ac_cv_func_$ac_func=yes"
  2078. else
  2079.   rm -rf conftest*
  2080.   eval "ac_cv_func_$ac_func=no"
  2081. fi
  2082. rm -f conftest*
  2083.  
  2084. fi
  2085. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2086.   echo "$ac_t""yes" 1>&6
  2087.   :
  2088. else
  2089.   echo "$ac_t""no" 1>&6
  2090. LIBOBJS="$LIBOBJS ${ac_func}.o"
  2091. fi
  2092.  
  2093. done
  2094.  
  2095. for ac_func in getcwd seteuid setreuid getdtablesize setgroups lchown setsid setfsuid setfsgid getnetgrent quotactl
  2096. do
  2097. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2098. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  2099.   echo $ac_n "(cached) $ac_c" 1>&6
  2100. else
  2101.   cat > conftest.$ac_ext <<EOF
  2102. #line 2103 "configure"
  2103. #include "confdefs.h"
  2104. /* System header to define __stub macros and hopefully few prototypes,
  2105.     which can conflict with char $ac_func(); below.  */
  2106. #include <assert.h>
  2107. /* Override any gcc2 internal prototype to avoid an error.  */
  2108. char $ac_func(); 
  2109.  
  2110. int main() { return 0; }
  2111. int t() {
  2112.  
  2113. /* The GNU C library defines this for functions which it implements
  2114.     to always fail with ENOSYS.  Some functions are actually named
  2115.     something starting with __ and the normal name is an alias.  */
  2116. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2117. choke me
  2118. #else
  2119. $ac_func();
  2120. #endif
  2121.  
  2122. ; return 0; }
  2123. EOF
  2124. if eval $ac_link; then
  2125.   rm -rf conftest*
  2126.   eval "ac_cv_func_$ac_func=yes"
  2127. else
  2128.   rm -rf conftest*
  2129.   eval "ac_cv_func_$ac_func=no"
  2130. fi
  2131. rm -f conftest*
  2132.  
  2133. fi
  2134. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2135.   echo "$ac_t""yes" 1>&6
  2136.     ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'`
  2137.   cat >> confdefs.h <<EOF
  2138. #define $ac_tr_func 1
  2139. EOF
  2140.  
  2141. else
  2142.   echo "$ac_t""no" 1>&6
  2143. fi
  2144. done
  2145.  
  2146. echo $ac_n "checking how to get list of mounted filesystems""... $ac_c" 1>&6
  2147.   if eval "test \"`echo '$''{'nfsd_cv_func_mountlist'+set}'`\" = set"; then
  2148.   echo $ac_n "(cached) $ac_c" 1>&6
  2149. else
  2150.   mounted=
  2151.  
  2152.     # DEC Alpha running OSF/1.
  2153.     cat > conftest.$ac_ext <<EOF
  2154. #line 2155 "configure"
  2155. #include "confdefs.h"
  2156.  
  2157.       #include <sys/types.h>
  2158.       #include <sys/mount.h>
  2159.       #include <sys/fs_types.h>
  2160. int main() { return 0; }
  2161. int t() {
  2162. struct statfs *stats;
  2163.       numsys = getfsstat ((struct statfs *)0, 0L, MNT_WAIT); 
  2164. ; return 0; }
  2165. EOF
  2166. if eval $ac_link; then
  2167.   rm -rf conftest*
  2168.   nfsd_cv_func_mountlist=getfsstat mounted=1
  2169. fi
  2170. rm -f conftest*
  2171.  
  2172.     if test -z "$mounted"; then
  2173.     # SVR4
  2174.     cat > conftest.$ac_ext <<EOF
  2175. #line 2176 "configure"
  2176. #include "confdefs.h"
  2177. #include <sys/mnttab.h>
  2178. EOF
  2179. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2180.   egrep "getmntent" >/dev/null 2>&1; then
  2181.   rm -rf conftest*
  2182.   nfsd_cv_func_mountlist=getmntent2 mounted=1
  2183. fi
  2184. rm -f conftest*
  2185.  
  2186.     fi
  2187.     if test -z "$mounted"; then
  2188.     # AIX.
  2189.     cat > conftest.$ac_ext <<EOF
  2190. #line 2191 "configure"
  2191. #include "confdefs.h"
  2192. #include <fshelp.h>
  2193. EOF
  2194. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2195. ac_err=`grep -v '^ *+' conftest.out`
  2196. if test -z "$ac_err"; then
  2197.   rm -rf conftest*
  2198.   nfsd_cv_func_mountlist=vmount mounted=1
  2199. else
  2200.   echo "$ac_err" >&5
  2201. fi
  2202. rm -f conftest*
  2203.     fi
  2204.     if test -z "$mounted"; then
  2205.     # SVR3
  2206.     cat > conftest.$ac_ext <<EOF
  2207. #line 2208 "configure"
  2208. #include "confdefs.h"
  2209. #include <sys/statfs.h>
  2210.       #include <sys/fstyp.h>
  2211.       #include <mnttab.h>
  2212. EOF
  2213. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2214. ac_err=`grep -v '^ *+' conftest.out`
  2215. if test -z "$ac_err"; then
  2216.   rm -rf conftest*
  2217.   nfsd_cv_func_mountlist=fread_fstyp mounted=1
  2218. else
  2219.   echo "$ac_err" >&5
  2220. fi
  2221. rm -f conftest*
  2222.     fi
  2223.     if test -z "$mounted"; then
  2224.     # 4.3BSD
  2225.     cat > conftest.$ac_ext <<EOF
  2226. #line 2227 "configure"
  2227. #include "confdefs.h"
  2228. #include <mntent.h>
  2229. EOF
  2230. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2231. ac_err=`grep -v '^ *+' conftest.out`
  2232. if test -z "$ac_err"; then
  2233.   rm -rf conftest*
  2234.   nfsd_cv_func_mountlist=getmntent1 mounted=1
  2235. else
  2236.   echo "$ac_err" >&5
  2237. fi
  2238. rm -f conftest*
  2239.     fi
  2240.     if test -z "$mounted"; then
  2241.     # 4.4BSD and DEC OSF/1.
  2242.     cat > conftest.$ac_ext <<EOF
  2243. #line 2244 "configure"
  2244. #include "confdefs.h"
  2245. #include <sys/mount.h>
  2246. EOF
  2247. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2248.   egrep "f_type;" >/dev/null 2>&1; then
  2249.   rm -rf conftest*
  2250.   nfsd_cv_func_mountlist=getmntinfo mounted=1
  2251. fi
  2252. rm -f conftest*
  2253.  
  2254.     fi
  2255.     if test -z "$mounted"; then
  2256.     # Ultrix
  2257.     cat > conftest.$ac_ext <<EOF
  2258. #line 2259 "configure"
  2259. #include "confdefs.h"
  2260. #include <sys/fs_types.h>
  2261.     #include <sys/mount.h>
  2262. EOF
  2263. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2264. ac_err=`grep -v '^ *+' conftest.out`
  2265. if test -z "$ac_err"; then
  2266.   rm -rf conftest*
  2267.   nfsd_cv_func_mountlist=getmnt mounted=1
  2268. else
  2269.   echo "$ac_err" >&5
  2270. fi
  2271. rm -f conftest*
  2272.     fi
  2273.     if test -z "$mounted"; then
  2274.     # SVR2
  2275.     cat > conftest.$ac_ext <<EOF
  2276. #line 2277 "configure"
  2277. #include "confdefs.h"
  2278. #include <mnttab.h>
  2279. EOF
  2280. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2281. ac_err=`grep -v '^ *+' conftest.out`
  2282. if test -z "$ac_err"; then
  2283.   rm -rf conftest*
  2284.   nfsd_cv_func_mountlist=fread mounted=1
  2285. else
  2286.   echo "$ac_err" >&5
  2287. fi
  2288. rm -f conftest*
  2289.     fi
  2290.     if test -z "$mounted"; then
  2291.       nfsd_cv_func_mountlist=unknown
  2292.     fi
  2293.   
  2294. fi
  2295.    echo "$ac_t""$nfsd_cv_func_mountlist" 1>&6
  2296.   case $nfsd_cv_mountlist in
  2297.     fread_fstyp) cat >> confdefs.h <<\EOF
  2298. #define MOUNTED_FREAD_FSTYP 1
  2299. EOF
  2300. ;;
  2301.     getfsstat)     cat >> confdefs.h <<\EOF
  2302. #define MOUNTED_GETFSSTAT 1
  2303. EOF
  2304. ;;
  2305.     getmnt)     cat >> confdefs.h <<\EOF
  2306. #define MOUNTED_GETMNT 1
  2307. EOF
  2308. ;;
  2309.     getmntent1)     cat >> confdefs.h <<\EOF
  2310. #define MOUNTED_GETMNTENT1 1
  2311. EOF
  2312. ;;
  2313.     getmntent2)     cat >> confdefs.h <<\EOF
  2314. #define MOUNTED_GETMNTENT2 1
  2315. EOF
  2316. ;;
  2317.     getmntinfo)     cat >> confdefs.h <<\EOF
  2318. #define MOUNTED_GETMNTINFO 1
  2319. EOF
  2320. ;;
  2321.     vmount)     cat >> confdefs.h <<\EOF
  2322. #define MOUNTED_VMOUNT 1
  2323. EOF
  2324. ;;
  2325.   esac
  2326.  
  2327. echo $ac_n "checking how to get filesystem space usage""... $ac_c" 1>&6
  2328.   if eval "test \"`echo '$''{'nfsd_cv_func_statfs'+set}'`\" = set"; then
  2329.   echo $ac_n "(cached) $ac_c" 1>&6
  2330. else
  2331.   space= 
  2332.     
  2333.     # DEC Alpha running OSF/1
  2334.     if test "$cross_compiling" = yes; then
  2335.     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  2336. else
  2337. cat > conftest.$ac_ext <<EOF
  2338. #line 2339 "configure"
  2339. #include "confdefs.h"
  2340.  
  2341.       #include <sys/types.h>
  2342.       #include <sys/mount.h>
  2343.       main ()
  2344.       {
  2345.       struct statfs fsd;
  2346.       exit (statfs (".", &fsd, sizeof (struct statfs)));}
  2347.     
  2348. EOF
  2349. eval $ac_link
  2350. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  2351.   nfsd_cv_func_statfs=OSF1 space=1
  2352. fi
  2353. fi
  2354. rm -fr conftest*
  2355.   
  2356.     # SVR4
  2357.     if test -z "$space"; then
  2358.       cat > conftest.$ac_ext <<EOF
  2359. #line 2360 "configure"
  2360. #include "confdefs.h"
  2361. #include <sys/statvfs.h>
  2362.         #include <sys/fstyp.h>
  2363. EOF
  2364. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2365. ac_err=`grep -v '^ *+' conftest.out`
  2366. if test -z "$ac_err"; then
  2367.   rm -rf conftest*
  2368.   nfsd_cv_func_statfs=statvfs space=1
  2369. else
  2370.   echo "$ac_err" >&5
  2371. fi
  2372. rm -f conftest*
  2373.     fi
  2374.   
  2375.     # AIX
  2376.     if test -z "$space"; then
  2377.       cat > conftest.$ac_ext <<EOF
  2378. #line 2379 "configure"
  2379. #include "confdefs.h"
  2380. #include <sys/statfs.h>
  2381. EOF
  2382. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2383.   egrep "f_nlsdirtype" >/dev/null 2>&1; then
  2384.   rm -rf conftest*
  2385.   nfsd_cv_func_statfs=statfs2_bsize space=1
  2386. fi
  2387. rm -f conftest*
  2388.  
  2389.     fi
  2390.   
  2391.     # SVR3
  2392.     if test -z "$space"; then
  2393.       cat > conftest.$ac_ext <<EOF
  2394. #line 2395 "configure"
  2395. #include "confdefs.h"
  2396. #include <sys/statfs.h>
  2397. EOF
  2398. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2399. ac_err=`grep -v '^ *+' conftest.out`
  2400. if test -z "$ac_err"; then
  2401.   rm -rf conftest*
  2402.   nfsd_cv_func_statfs=statfs4 space=1
  2403. else
  2404.   echo "$ac_err" >&5
  2405. fi
  2406. rm -f conftest*
  2407.     fi
  2408.   
  2409.     # 4.3BSD
  2410.     if test -z "$space"; then
  2411.       cat > conftest.$ac_ext <<EOF
  2412. #line 2413 "configure"
  2413. #include "confdefs.h"
  2414. #include <sys/vfs.h>
  2415. EOF
  2416. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2417. ac_err=`grep -v '^ *+' conftest.out`
  2418. if test -z "$ac_err"; then
  2419.   rm -rf conftest*
  2420.   nfsd_cv_func_statfs=statfs2_bsize space=1
  2421. else
  2422.   echo "$ac_err" >&5
  2423. fi
  2424. rm -f conftest*
  2425.     fi
  2426.   
  2427.     # 4.4BSD
  2428.     if test -z "$space"; then
  2429.       cat > conftest.$ac_ext <<EOF
  2430. #line 2431 "configure"
  2431. #include "confdefs.h"
  2432. #include <sys/mount.h>
  2433. EOF
  2434. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2435.   egrep "MOUNT_UFS" >/dev/null 2>&1; then
  2436.   rm -rf conftest*
  2437.   nfsd_cv_func_statfs=statfs2_fsize space=1
  2438. fi
  2439. rm -f conftest*
  2440.  
  2441.     fi
  2442.   
  2443.     # SVR2
  2444.     if test -z "$space"; then
  2445.       cat > conftest.$ac_ext <<EOF
  2446. #line 2447 "configure"
  2447. #include "confdefs.h"
  2448. #include <sys/filsys.h>
  2449. EOF
  2450. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2451. ac_err=`grep -v '^ *+' conftest.out`
  2452. if test -z "$ac_err"; then
  2453.   rm -rf conftest*
  2454.   nfsd_cv_func_statfs=read space=1
  2455. else
  2456.   echo "$ac_err" >&5
  2457. fi
  2458. rm -f conftest*
  2459.     fi
  2460.   
  2461.     # Ultrix
  2462.     if test -z "$space"; then
  2463.       cat > conftest.$ac_ext <<EOF
  2464. #line 2465 "configure"
  2465. #include "confdefs.h"
  2466. #include <sys/mount.h>
  2467. EOF
  2468. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2469. ac_err=`grep -v '^ *+' conftest.out`
  2470. if test -z "$ac_err"; then
  2471.   rm -rf conftest*
  2472.   nfsd_cv_func_statfs=statfs2_fs_data space=1
  2473. else
  2474.   echo "$ac_err" >&5
  2475. fi
  2476. rm -f conftest*
  2477.     fi
  2478.   
  2479.     if test -z "$space"; then
  2480.       nfsd_cv_func_statfs=unknown
  2481.     fi
  2482.     
  2483. fi
  2484.      echo "$ac_t""$nfsd_cv_func_statfs" 1>&6
  2485.     case $nfsd_cv_func_statfs in
  2486.     OSF1)        cat >> confdefs.h <<\EOF
  2487. #define STATFS_OSF1 1
  2488. EOF
  2489. ;;
  2490.     read)        cat >> confdefs.h <<\EOF
  2491. #define STAT_READ 1
  2492. EOF
  2493. ;;
  2494.     statfs2_bsize)    cat >> confdefs.h <<\EOF
  2495. #define STAT_STATFS2_BSIZE 1
  2496. EOF
  2497. ;;
  2498.     statfs2_fs_data)    cat >> confdefs.h <<\EOF
  2499. #define STAT_STATFS2_FS_DATA 1
  2500. EOF
  2501. ;;
  2502.     statfs2_fsize)    cat >> confdefs.h <<\EOF
  2503. #define STAT_STATFS2_FSIZE 1
  2504. EOF
  2505. ;;
  2506.     statfs4)        cat >> confdefs.h <<\EOF
  2507. #define STAT_STATFS4 1
  2508. EOF
  2509. ;;
  2510.     statvfs)        cat >> confdefs.h <<\EOF
  2511. #define STAT_STATVFS 1
  2512. EOF
  2513. ;;
  2514.     esac
  2515.  
  2516. if test -f site.mk; then
  2517.     . site.mk
  2518.   fi
  2519.   if test ! -z "$LIBWRAP_DIR"; then
  2520.     echo $ac_n "checking for link problem with libwrap.a""... $ac_c" 1>&6
  2521.     if eval "test \"`echo '$''{'nfsd_cv_lib_wrap_bug'+set}'`\" = set"; then
  2522.   echo $ac_n "(cached) $ac_c" 1>&6
  2523. else
  2524.   OLDLIBS=$LIBS
  2525.       LIBS="$LIBS $LIBWRAP_DIR $LIBWRAP_LIB"
  2526.       cat > conftest.$ac_ext <<EOF
  2527. #line 2528 "configure"
  2528. #include "confdefs.h"
  2529.  
  2530.         extern int deny_severity;
  2531.       
  2532. int main() { return 0; }
  2533. int t() {
  2534.  
  2535.         deny_severity=1;
  2536.       
  2537. ; return 0; }
  2538. EOF
  2539. if eval $ac_link; then
  2540.   rm -rf conftest*
  2541.   nfsd_cv_lib_wrap_bug=no
  2542. else
  2543.   rm -rf conftest*
  2544.   nfsd_cv_lib_wrap_bug=yes
  2545. fi
  2546. rm -f conftest*
  2547.  
  2548.     
  2549. fi
  2550.      echo "$ac_t""$nfsd_cv_lib_wrap_bug" 1>&6
  2551.     test $nfsd_cv_lib_wrap_bug = yes && cat >> confdefs.h <<\EOF
  2552. #define HAVE_LIBWRAP_BUG 1
  2553. EOF
  2554.  
  2555.     LIBS=$OLDLIBS
  2556.   fi
  2557.  
  2558. trap '' 1 2 15
  2559. cat > confcache <<\EOF
  2560. # This file is a shell script that caches the results of configure
  2561. # tests run on this system so they can be shared between configure
  2562. # scripts and configure runs.  It is not useful on other systems.
  2563. # If it contains results you don't want to keep, you may remove or edit it.
  2564. #
  2565. # By default, configure uses ./config.cache as the cache file,
  2566. # creating it if it does not exist already.  You can give configure
  2567. # the --cache-file=FILE option to use a different cache file; that is
  2568. # what configure does when it calls configure scripts in
  2569. # subdirectories, so they share the cache.
  2570. # Giving --cache-file=/dev/null disables caching, for debugging configure.
  2571. # config.status only pays attention to the cache file if you give it the
  2572. # --recheck option to rerun configure.
  2573. #
  2574. EOF
  2575. # Ultrix sh set writes to stderr and can't be redirected directly,
  2576. # and sets the high bit in the cache file unless we assign to the vars.
  2577. (set) 2>&1 |
  2578.   sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \
  2579.   >> confcache
  2580. if cmp -s $cache_file confcache; then
  2581.   :
  2582. else
  2583.   if test -w $cache_file; then
  2584.     echo "updating cache $cache_file"
  2585.     cat confcache > $cache_file
  2586.   else
  2587.     echo "not updating unwritable cache $cache_file"
  2588.   fi
  2589. fi
  2590. rm -f confcache
  2591.  
  2592. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  2593.  
  2594. test "x$prefix" = xNONE && prefix=$ac_default_prefix
  2595. # Let make expand exec_prefix.
  2596. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
  2597.  
  2598. # Any assignment to VPATH causes Sun make to only execute
  2599. # the first set of double-colon rules, so remove it if not needed.
  2600. # If there is a colon in the path, we need to keep it.
  2601. if test "x$srcdir" = x.; then
  2602.   ac_vpsub='/^[     ]*VPATH[     ]*=[^:]*$/d'
  2603. fi
  2604.  
  2605. trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
  2606.  
  2607. DEFS=-DHAVE_CONFIG_H
  2608.  
  2609. # Without the "./", some shells look in PATH for config.status.
  2610. : ${CONFIG_STATUS=./config.status}
  2611.  
  2612. echo creating $CONFIG_STATUS
  2613. rm -f $CONFIG_STATUS
  2614. cat > $CONFIG_STATUS <<EOF
  2615. #! /bin/sh
  2616. # Generated automatically by configure.
  2617. # Run this file to recreate the current configuration.
  2618. # This directory was configured as follows,
  2619. # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  2620. #
  2621. # $0 $ac_configure_args
  2622. #
  2623. # Compiler output produced by configure, useful for debugging
  2624. # configure, is in ./config.log if it exists.
  2625.  
  2626. ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
  2627. for ac_option
  2628. do
  2629.   case "\$ac_option" in
  2630.   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  2631.     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
  2632.     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
  2633.   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
  2634.     echo "$CONFIG_STATUS generated by autoconf version 2.3"
  2635.     exit 0 ;;
  2636.   -help | --help | --hel | --he | --h)
  2637.     echo "\$ac_cs_usage"; exit 0 ;;
  2638.   *) echo "\$ac_cs_usage"; exit 1 ;;
  2639.   esac
  2640. done
  2641.  
  2642. ac_given_srcdir=$srcdir
  2643. ac_given_INSTALL="$INSTALL"
  2644.  
  2645. trap 'rm -fr `echo "Makefile config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
  2646.  
  2647. # Protect against being on the right side of a sed subst in config.status. 
  2648. sed 's/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\\\&%]/\\\\&/g; 
  2649.  s/@@/%@/; s/@@/@%/; s/@g$/%g/' > conftest.subs <<\CEOF
  2650. $ac_vpsub
  2651. $extrasub
  2652. s%@CFLAGS@%$CFLAGS%g
  2653. s%@CPPFLAGS@%$CPPFLAGS%g
  2654. s%@CXXFLAGS@%$CXXFLAGS%g
  2655. s%@DEFS@%$DEFS%g
  2656. s%@LDFLAGS@%$LDFLAGS%g
  2657. s%@LIBS@%$LIBS%g
  2658. s%@exec_prefix@%$exec_prefix%g
  2659. s%@prefix@%$prefix%g
  2660. s%@program_transform_name@%$program_transform_name%g
  2661. s%@CC@%$CC%g
  2662. s%@WARNFLAGS@%$WARNFLAGS%g
  2663. s%@RPC_WARNFLAGS@%$RPC_WARNFLAGS%g
  2664. s%@CPP@%$CPP%g
  2665. s%@RANLIB@%$RANLIB%g
  2666. s%@RPCGEN@%$RPCGEN%g
  2667. s%@RPCGEN_C@%$RPCGEN_C%g
  2668. s%@RPCGEN_I@%$RPCGEN_I%g
  2669. s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
  2670. s%@INSTALL_DATA@%$INSTALL_DATA%g
  2671. s%@LIBOBJS@%$LIBOBJS%g
  2672. s%@ALLOCA@%$ALLOCA%g
  2673.  
  2674. CEOF
  2675. EOF
  2676. cat >> $CONFIG_STATUS <<EOF
  2677.  
  2678. CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
  2679. EOF
  2680. cat >> $CONFIG_STATUS <<\EOF
  2681. for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
  2682.   # Support "outfile[:infile]", defaulting infile="outfile.in".
  2683.   case "$ac_file" in
  2684.   *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
  2685.        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  2686.   *) ac_file_in="${ac_file}.in" ;;
  2687.   esac
  2688.  
  2689.   # Adjust relative srcdir, etc. for subdirectories.
  2690.  
  2691.   # Remove last slash and all that follows it.  Not all systems have dirname.
  2692.   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  2693.   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  2694.     # The file is in a subdirectory.
  2695.     test ! -d "$ac_dir" && mkdir "$ac_dir"
  2696.     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
  2697.     # A "../" for each directory in $ac_dir_suffix.
  2698.     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  2699.   else
  2700.     ac_dir_suffix= ac_dots=
  2701.   fi
  2702.  
  2703.   case "$ac_given_srcdir" in
  2704.   .)  srcdir=.
  2705.       if test -z "$ac_dots"; then top_srcdir=.
  2706.       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
  2707.   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
  2708.   *) # Relative path.
  2709.     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
  2710.     top_srcdir="$ac_dots$ac_given_srcdir" ;;
  2711.   esac
  2712.  
  2713.   case "$ac_given_INSTALL" in
  2714.   [/$]*) INSTALL="$ac_given_INSTALL" ;;
  2715.   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
  2716.   esac
  2717.   echo creating "$ac_file"
  2718.   rm -f "$ac_file"
  2719.   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
  2720.   case "$ac_file" in
  2721.   *Makefile*) ac_comsub="1i\\
  2722. # $configure_input" ;;
  2723.   *) ac_comsub= ;;
  2724.   esac
  2725.   sed -e "$ac_comsub
  2726. s%@configure_input@%$configure_input%g
  2727. s%@srcdir@%$srcdir%g
  2728. s%@top_srcdir@%$top_srcdir%g
  2729. s%@INSTALL@%$INSTALL%g
  2730. " -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
  2731. fi; done
  2732. rm -f conftest.subs
  2733.  
  2734. # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
  2735. # NAME is the cpp macro being defined and VALUE is the value it is being given.
  2736. #
  2737. # ac_d sets the value in "#define NAME VALUE" lines.
  2738. ac_dA='s%^\([     ]*\)#\([     ]*define[     ][     ]*\)'
  2739. ac_dB='\([     ][     ]*\)[^     ]*%\1#\2'
  2740. ac_dC='\3'
  2741. ac_dD='%g'
  2742. # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
  2743. ac_uA='s%^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  2744. ac_uB='\([     ]\)%\1#\2define\3'
  2745. ac_uC=' '
  2746. ac_uD='\4%g'
  2747. # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
  2748. ac_eA='s%^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  2749. ac_eB='$%\1#\2define\3'
  2750. ac_eC=' '
  2751. ac_eD='%g'
  2752.  
  2753. CONFIG_HEADERS=${CONFIG_HEADERS-"config.h"}
  2754. for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
  2755.   # Support "outfile[:infile]", defaulting infile="outfile.in".
  2756.   case "$ac_file" in
  2757.   *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
  2758.        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  2759.   *) ac_file_in="${ac_file}.in" ;;
  2760.   esac
  2761.  
  2762.   echo creating $ac_file
  2763.  
  2764.   rm -f conftest.frag conftest.in conftest.out
  2765.   cp $ac_given_srcdir/$ac_file_in conftest.in
  2766.  
  2767. EOF
  2768.  
  2769. # Transform confdefs.h into a sed script conftest.vals that substitutes
  2770. # the proper values into config.h.in to produce config.h.  And first:
  2771. # Protect against being on the right side of a sed subst in config.status. 
  2772. # Protect against being in an unquoted here document in config.status.
  2773. rm -f conftest.vals
  2774. cat > conftest.hdr <<\EOF
  2775. s/[\\&%]/\\&/g
  2776. s%[\\$`]%\\&%g
  2777. s%#define \([A-Za-z_][A-Za-z0-9_]*\) \(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
  2778. s%ac_d%ac_u%gp
  2779. s%ac_u%ac_e%gp
  2780. EOF
  2781. sed -n -f conftest.hdr confdefs.h > conftest.vals
  2782. rm -f conftest.hdr
  2783.  
  2784. # This sed command replaces #undef with comments.  This is necessary, for
  2785. # example, in the case of _POSIX_SOURCE, which is predefined and required
  2786. # on some systems where configure will not decide to define it.
  2787. cat >> conftest.vals <<\EOF
  2788. s%^[     ]*#[     ]*undef[     ][     ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
  2789. EOF
  2790.  
  2791. # Break up conftest.vals because some shells have a limit on
  2792. # the size of here documents, and old seds have small limits too.
  2793. # Maximum number of lines to put in a single here document.
  2794. ac_max_here_lines=12
  2795.  
  2796. rm -f conftest.tail
  2797. while :
  2798. do
  2799.   ac_lines=`grep -c . conftest.vals`
  2800.   # grep -c gives empty output for an empty file on some AIX systems.
  2801.   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
  2802.   # Write a limited-size here document to conftest.frag.
  2803.   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
  2804.   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
  2805.   echo 'CEOF
  2806.   sed -f conftest.frag conftest.in > conftest.out
  2807.   rm -f conftest.in
  2808.   mv conftest.out conftest.in
  2809. ' >> $CONFIG_STATUS
  2810.   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
  2811.   rm -f conftest.vals
  2812.   mv conftest.tail conftest.vals
  2813. done
  2814. rm -f conftest.vals
  2815.  
  2816. cat >> $CONFIG_STATUS <<\EOF
  2817.   rm -f conftest.frag conftest.h
  2818.   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
  2819.   cat conftest.in >> conftest.h
  2820.   rm -f conftest.in
  2821.   if cmp -s $ac_file conftest.h 2>/dev/null; then
  2822.     echo "$ac_file is unchanged"
  2823.     rm -f conftest.h
  2824.   else
  2825.     rm -f $ac_file
  2826.     mv conftest.h $ac_file
  2827.   fi
  2828. fi; done
  2829.  
  2830.  
  2831.  
  2832. exit 0
  2833. EOF
  2834. chmod +x $CONFIG_STATUS
  2835. rm -fr confdefs* $ac_clean_files
  2836. test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
  2837.  
  2838.